﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<nsadv.Statistic.Web.ViewModels.LogonModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Вход в кабинет
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<div id="logincontainer">
		<% using (Html.BeginForm())
	 {%>
		<table id="loginform">
			<tr>
				<td>
					<input id="login" name="UserName" type="text" value="<%: Model.UserName %>" />
				</td>
				<td>
					<input id="loginbtn" type="image" src="../../Content/img/loginbtn.png" value="Логин" />
				</td>
			</tr>
			<tr>
				<td>
					<input id="pswd" name="Password" type="password" value="<%: Model.Password %>" />
				</td>
				<td>
					<a href="#" class="dashed">Забыли пароль</a>
				</td>
			</tr>
		</table>
		<%: Html.ValidationSummary(true) %>
		<% } %>
	</div>
	<script type="text/javascript">
		$(document).ready(function () {
			$("#logincontainer")
			.css({
				"left": ($(".content").width() - $(".content").width() % 2) / 2 - 209,
				"top": ($(".content").height() - $(".content").height() % 2) / 2 - 171
			});

			$("#login").focus(
					function () {
						if ($(this).attr("value") == "Логин") {
							$(this).attr("value", "");
						}
					}
			);
			$("#login").blur(
					function () {
						if ($(this).attr("value") == "") {
							$(this).attr("value", "Логин");
						}
					}
			);
			$("#pswd").focus(
					function () {
						if ($(this).attr("value") == "Пароль") {
							$(this).attr("value", "");
						}
					}
			);
			$("#pswd").blur(
					function () {
						if ($(this).attr("value") == "") {
							$(this).attr("value", "Пароль");
						}
					}
			);
		});
	</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="DocumentReadyScript" runat="server">
	$("#loginscreen").show();
</asp:Content>
